/**
  @file     	DESIGNPATTERN_Bridge.cpp 
  @brief    	1.When the algorithm to create complex object should be independent of the part of the object, 
                  as well as their assembly;
				2.When construction process must be allowed to construct the object is different;
  @author  	arvin
  @version 	1.0   2012/12/20
 */
#include "stdafx.h"

#ifndef CXX_DESIGNPATTERN_BRIDGE_H
#include "DESIGNPATTERN_Bridge.h"
#endif

#ifndef CXX_DESIGNPATTERN_BRIDGEIMP_H
#include "DESIGNPATTERN_BridgeImp.h"
#endif

#ifndef CXX_DESIGNPATTERN_ABSTRACTFACTORY_H
#include "DESIGNPATTERN_AbstractFactory.h"
#endif

#ifndef CXX_COMPUTER_H
#include "Computer.h"
#endif

 /**
 * Construction
 *
 * @param COMPUTER_TYPE eComputer
 * @param AbstractBridgeImp* pAbstractBridgeImp
 * @return
 */
AbstractBridge::AbstractBridge(COMPUTER_TYPE eComputer, AbstractBridgeImp* pAbstractBridgeImp) :
	m_eComputer(eComputer),
	m_pAbstractBridgeImp(pAbstractBridgeImp)
{
	DEBUG_PRINTF("m_eComputer[%d], Computer[%s]", m_eComputer, STATIC_CONST_STRING_COMPUTER[m_eComputer].c_str());
}

/**
* Destruction
*
* @param VOID
* @return
*/
AbstractBridge::~AbstractBridge()
{
	DEBUG_PRINTF("m_eComputer[%d], Computer[%s]", m_eComputer, STATIC_CONST_STRING_COMPUTER[m_eComputer].c_str());
}

/**
* Operation
*
* @param VOID
* @return VOID
* @note
*/
VOID
AbstractBridge::Operation()
{
	DEBUG_PRINTF("m_eComputer[%d], Computer[%s]", m_eComputer, STATIC_CONST_STRING_COMPUTER[m_eComputer].c_str());
}

/**
* SetComputer
*
* @param COMPUTER_TYPE eComputer
* @return
*/
VOID
AbstractBridge::SetComputer(COMPUTER_TYPE eComputer)
{
	DEBUG_PRINTF("m_eComputer[%d], Computer[%s]", m_eComputer, STATIC_CONST_STRING_COMPUTER[m_eComputer].c_str());
	m_eComputer = eComputer;
}

/**
* GetComputer
*
* @param VOID
* @return COMPUTER_TYPE
*/
COMPUTER_TYPE
AbstractBridge::GetComputer()
{
	DEBUG_PRINTF("m_eComputer[%d], Computer[%s]", m_eComputer, STATIC_CONST_STRING_COMPUTER[m_eComputer].c_str());
	return m_eComputer;
}

/**
* Construction
*
* @param AbstractBridgeImp* pAbstractBridgeImp
* @return
*/
NotebookBridge::NotebookBridge(AbstractBridgeImp* pAbstractBridgeImp) :
	AbstractBridge(COMPUTER_NOTEBOOK, pAbstractBridgeImp)
{
	DEBUG_PRINTF("");
}

/**
* Destruction
*
* @param VOID
* @return
*/
NotebookBridge::~NotebookBridge()
{
	DEBUG_PRINTF("");
}

/**
* Operation
*
* @param VOID
* @return VOID
* @note
*/
VOID
NotebookBridge::Operation()
{
	DEBUG_PRINTF("");
	AbstractBridge::Operation();
}

/**
* Construction
*
* @param AbstractBridgeImp* pAbstractBridgeImp
* @return
*/
DesktopBridge::DesktopBridge(AbstractBridgeImp* pAbstractBridgeImp) :
	AbstractBridge(COMPUTER_DESKTOP, pAbstractBridgeImp)
{
	DEBUG_PRINTF("");
}

/**
* Destruction
*
* @param VOID
* @return
*/
DesktopBridge::~DesktopBridge()
{
	DEBUG_PRINTF("");
}

/**
* Operation
*
* @param VOID
* @return VOID
* @note
*/
VOID
DesktopBridge::Operation()
{
	DEBUG_PRINTF("");
	AbstractBridge::Operation();
}

/**
* Construction
*
* @param AbstractBridgeImp* pAbstractBridgeImp
* @return
*/
ServerBridge::ServerBridge(AbstractBridgeImp* pAbstractBridgeImp) :
	AbstractBridge(COMPUTER_SERVER, pAbstractBridgeImp)
{
	DEBUG_PRINTF("");
}

/**
* Destruction
*
* @param VOID
* @return
*/
ServerBridge::~ServerBridge()
{
	DEBUG_PRINTF("");
}

/**
* Operation
*
* @param VOID
* @return VOID
* @note
*/
VOID
ServerBridge::Operation()
{
	DEBUG_PRINTF("");
	AbstractBridge::Operation();
}

/* EOF */